﻿namespace Creek.UI.EFML.Base
{
    using System.Windows.Forms;

    using Creek.UI.EFML.Base.Controls;
    using Creek.UI.EFML.Base.Controls.Navigator;

    internal class WinformsControlProvider : ControlProvider
    {
        #region Constructors and Destructors

        public WinformsControlProvider()
        {
            this.ScriptingTypes.Add(typeof(MessageBox));
            this.ScriptingFuncs.Add("function alert(msg) {MessageBox.Show(msg);}");

            this.Add<Form>(Tag.Window);
            this.Add<Label>(Tag.Label);
            this.Add<Button>(Tag.Button);
            this.Add<CheckBox>(Tag.Checkbox);
            this.Add<Dropdown>(Tag.Dropdown);
            this.Add<Link>(Tag.Link);
            this.Add<RadioButton>(Tag.Radiobutton);
            this.Add<PlaceholderTextBox>(Tag.Textbox);
            this.Add<DivPanel>(Tag.Div);
            this.Add<GroupBox>(Tag.Group);
            this.Add<PageNavigator>(Tag.Navigator);
            this.Add<Line>(Tag.Line);
            this.Add<BreakPanel>(Tag.Break);
            this.Add<WebBrowser>(Tag.WebView);
        }

        #endregion
    }
}